#ifndef MOSAIC_H
#define MOSAIC_H

#include "RGBEffect.h"
#include "Curve/hsv.h"

struct Tile {
    hsv_t hsv;
    float brightness = 0.f;
    float decrease_speed_mult = 1.f;
};

class Mosaic : public RGBEffect
{

public:
    Mosaic();
    ~Mosaic();

    //EFFECT_REGISTERER(ClassName(), CAT_SIMPLE, [](){return new Mosaic;});

    static std::string const ClassName() {return "Mosaic";}
    //void DefineExtraOptions(QLayout*) override;
    void StepEffect(ControllerZone* const controller_zone) override;
    void OnControllerZonesListChanged(ControllerZone* const controller_zone) override;

private:
    //Ui::Mosaic *ui;

    void ResetMosaic(ControllerZone* const controller_zone);

    void UpdateTiles(unsigned int);

    std::vector<std::vector<Tile>> tiles;
};

#endif // MOSAIC_H
